package com.platform.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.compress.utils.Lists;
import org.springframework.util.AntPathMatcher;
import org.springframework.util.PathMatcher;

import java.io.Serializable;
import java.util.List;

/**
 * 功能描述: 菜单节点信息DTO
 *
 * @author tommy create on 2018-08-17-8:48
 */
@Setter
@Getter
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class FunctionTreeNode<T extends FunctionTreeNode> implements Serializable {
    private static final long serialVersionUID = -4178194906613966699L;
    private static PathMatcher pathMatcher = new AntPathMatcher();
    /**
     * ID
     */
    private String id;

    /**
     * 父节点id
     */
    private String parentId;

    /**
     * 菜单类型(目录菜单 or 功能菜单)
     */
    private String menuType;

    /**
     * 菜单名称
     */
    private String text;

    /**
     * 动作按钮optCode
     */
    private String optCode;

    /**
     * 非动作菜单路由path
     */
    private String path;

    /**
     * 菜单URL
     */
    private String url;

    /**
     * 是否启用
     */
    private boolean enabled = true;

    /**
     * 子节点列表
     */
    private List<T> children = Lists.newArrayList();

    /**
     * 描述
     */
    private String desc;

    /**
     * 子应用编码
     */
    private String subSystemCode;

    /**
     * 图标
     */
    private String icon;

    /**
     * 业务类型
     */
    private String bizType;

    private String linkType;

}
